package com.yonyou.cyxdms.basedata.service.dto.option;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;


/**
 * <p>
 * 选装
 * </p>
 *
 * @author zys
 * @since 2020-02-10
 */

public class VsOptionDTO extends DMSBaseDTO implements Serializable {
    //打包
    private static final long serialVersionUID = 1L;

    /**
     * 选装ID
     */
        private Long optionId;
        /**
     * 公司代码
     */
        private String companyCode;
        /**
     * 所有者代码
     */
        private String ownerCode;
        /**
     * 所有者的父组织代码（用于二网使用）
     */
        private String ownerParCode;
        /**
     * 配置ID
     */
        private Long packageId;
        /**
     * 选装编号
     */
        private String optionCode;
        /**
     * 选装名称
     */
        private String optionName;
        
        /**
         * 是否有效
         */
        private Integer isValid;
        
        private Long sourceId;
        
        @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
        @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
        private LocalDateTime sourceChangedAt;
        /**
     * 是否删除(0:未删除1:删除)
     */
        private Boolean isDeleted;
    
    public VsOptionDTO() {
        super();
    }




    public Long getOptionId() {
        return optionId;
    }


    public void setOptionId(Long optionId) {
        this.optionId = optionId;
    }



    public String getCompanyCode() {
        return companyCode;
    }


    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }



    public String getOwnerCode() {
        return ownerCode;
    }


    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }



    public String getOwnerParCode() {
        return ownerParCode;
    }


    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }



    public Long getPackageId() {
        return packageId;
    }


    public void setPackageId(Long packageId) {
        this.packageId = packageId;
    }



    public String getOptionCode() {
        return optionCode;
    }


    public void setOptionCode(String optionCode) {
        this.optionCode = optionCode;
    }



    public String getOptionName() {
        return optionName;
    }


    public void setOptionName(String optionName) {
        this.optionName = optionName;
    }



    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }
    
    public Integer getIsValid() {
		return isValid;
	}

	public void setIsValid(Integer isValid) {
		this.isValid = isValid;
	}

	public Long getSourceId() {
		return sourceId;
	}

	public void setSourceId(Long sourceId) {
		this.sourceId = sourceId;
	}

	public LocalDateTime getSourceChangedAt() {
		return sourceChangedAt;
	}

	public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
		this.sourceChangedAt = sourceChangedAt;
	}



    @Override
	public String toString() {
		return "VsOptionDTO [optionId=" + optionId + ", companyCode=" + companyCode + ", ownerCode=" + ownerCode
				+ ", ownerParCode=" + ownerParCode + ", packageId=" + packageId + ", optionCode=" + optionCode
				+ ", optionName=" + optionName + ", isValid=" + isValid + ", sourceId=" + sourceId
				+ ", sourceChangedAt=" + sourceChangedAt + ", isDeleted=" + isDeleted + "]";
	}


	/**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author zys
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author zys
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "optionId");
    }

}
